<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>var</title>
</head>
<body>
<div th:with="name = '张三'">
    <p th:text="${name}"></p>
</div>

<div th:with="id = 100,name = '张三',myage = ${age}">
    <p th:text="${id}"></p>
    <p th:text="${name}"></p>
    <p th:text="${myage}"></p>
</div>
</body>
</html>